<template>
    <div>
        帐号:<input type="text" v-model="vname">
        密码:<input type="password" v-model="vpassword">
        <button @click="login">登录</button>
        <p>{{ tsss }}</p>
    </div>
</template>

<script>
export default {
        data(){
            return{
                vname:'',
                vpassword:'',
                tsss:''
            }
        },
        methods: {
            login(){
                console.log("12312")
            if(this.vname === 'abc' && this.vpassword === '123') {
                this.tsss = "帐号密码正确"
            } else {
                this.tsss = "帐号或密码不正确"
            }
            }
        },
}
</script>

<style>

</style>